#include <iostream>
#include <stdio.h>
const int N = 100007;
int list[N];
void merge(int a, int b) {
    if (a == b) return;
    if (a == b-1) return;
    int mid = (a+b) / 2;
    merge(a, mid);
    merge(mid, b);
    int *p = new int[b-a];
    int mark_p = 0;
    int mark1 = a, mark2 = mid;
    while (mark1 != mid && mark2 != b) {
        if (list[mark1] < list[mark2]) {
            p[mark_p] = list[mark1];
            mark_p++;
            mark1++;
        }
        else {
            p[mark_p] = list[mark2];
            mark_p++;
            mark2++;
        }
    }
    while (mark1 != mid) {
        p[mark_p++] = list[mark1++];
    }
    while (mark2 != b) {
        p[mark_p++] = list[mark2++];
    }
    for (int i=0; i<mark_p; ++i) {
        list[a+i] = p[i];
    }
    delete []p;
}

int main(int argc, char** argv) {
    int n;
    scanf("%d", &n);
    for (int i=0; i<n; ++i) {
        scanf("%d", list+i);
    }
    merge(0, n);
    for (int i=0; i<n; ++i) {
        printf("%d ", list[i]);
    }
    printf("\n");
    return 0;
}
